package com.farm.shop.feign;

import com.farm.shop.pojo.CustDevice;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "shop")
public interface ShopFeign {
    /**
     * 根据客户的设备id修改安装状态以及设备位置
     * @param cdid
     * @param position
     */
    @RequestMapping("/custdevice/updateByCustDeviceId/{cdid}/{position}")
    public void updateByCustDeviceId(@PathVariable("cdid") Integer cdid, @PathVariable("position") String position);

    /**
     * 根据大田id查询相关的设备信息
     * @param farmlandId
     * @return
     */
    @RequestMapping("/custdevice/findCustDevicesByfarmlandId")
    public List<CustDevice> findCustDevicesByfarmlandId(@RequestParam("farmlandId")Integer farmlandId);
}
